<!-- 分类内页数据 -->
<template>
<div class='list'>
    <ul>
        <li v-for="(categoryListData,index) in categoryListDatas" :key="index">
            <div class="img">
                <img :src="categoryListData.goods_thumb" alt="">
            </div>
            <div>
                <div class="title">{{categoryListData.goods_name}}</div>
                <div class="price">{{categoryListData.shop_price}}</div>
            </div>
        </li>
    </ul>
      <div class="loading" v-if="isLoading">
      <img src="@/assets/images/loading.gif" alt />
      <span>玩命加载中...</span>
    </div>
    <div class="loading" v-else>
      <span>俺也是有底线的</span>
    </div>
    <div style="height:5rem"></div>
</div>
</template>

<script>


export default {

components: {},
data() {
//这里存放数据
return {

};
},

computed: {},
props:{
    categoryListDatas:Array,
    isLoading:Boolean
},
//方法集合
methods: {

},

}
</script>
<style lang="less">
.list {
   width: 100%;
    background-color: #f4f4f4;
  ul {
    width: 100%;
      width: calc(100% - 1rem);
       margin: 0.5rem 0.5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-top: 1rem;
    li {
      width: 49%;
      background: #fff;
      margin-bottom: 1rem;
      border-radius: 1rem;
      overflow: hidden;
      height: 26.5rem;
      img {
        width: 100%;
        height: 17rem;
      }
      .title {
        font-size: 1.4rem;
        height: 4rem;
        line-height: 2rem;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
      }
      .price {
      font-size: 16px;
    font-weight: 700;
         color: rgb(242, 14, 40);
        line-height: 3rem;
        &::before {
          content: "￥";
        }
      }
    }
  }
  .loading {
    width: 100%;
    height: 5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    img {
      width: 3rem;
      height: 3rem;
    }
    span {
      font-size: 1.4rem;
      color: #999;
      margin-left: 1rem;
    }
  }
}
</style>